<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
    <button type="button" id="query">请求数据</button>
    <div id="content" style="background-color: aquamarine; width: 300px; height: 500px"></div>
    
<!--    <image src=""></image>-->

</body>
<script type="text/javascript">
    $("#query").click(function (){
        $.ajax({
            url:"http://127.0.0.1:8080/u/v1/user/list",
            dataType: "json",
            type: "get",
            beforeSend: function(request){
                request.setRequestHeader("x-token", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTcsIm5pY2tfbmFtZSI6Iui_meS4queUqOaIt-eahOWvhueggeaYrzEyMzQ1NiIsImF1dGhvcml0eV9pZCI6MiwiZXhwIjoxNzUwNTg5MTkzLCJpc3MiOiJDaGVuIFpob25nIiwibmJmIjoxNzQ3OTk3MTkzfQ.66EzjjzwyxGhPer3bl6IGvtf3gF2FB0hzPGs9Zux_Oo")
            },
            success: function (result){
                console.log(result.data)
                $("#content").text(result.data)
            },
            error : function (data){
                alert("请求出错")
            }
        })
    });
</script>
</html>